Ext.RuntimeParam = Ext.extend(Ext.Button,{
			render:function(container,pos){
				this.setText('运行时参数');//设置按钮文字
				/*按钮处理函数*/
				this.addListener('click',function(){
						//处理运行时参数
					var t = this.initialConfig.e;
					var type = t.getEl().getAttributeNS('','paramType');
					
					var mul = (type==1);
					//运行时参数
					var sm = new Ext.grid.RowSelectionModel({singleSelect:!mul});
					var store =  new Ext.data.JsonStore({
						    id:'name',
					        data: [{name:'userId',remark:'当前用户'},{name:'sysDate',remark:'当前时间'},{name:'userRoles',remark:'当前用户角色'}],
					        fields: ['name','remark']
					    });
					var grid = new Ext.grid.GridPanel({
					    store:store,
					    columns: [
					        {header: "运行时参数", width: 120, sortable: true, dataIndex: 'name'},
					        {header: "说明", width: 120, sortable: true, dataIndex: 'remark'}
					    ],
					    viewConfig: {
					        forceFit: true
					    },
					    sm: sm,
					    width:580,
					    height:300,
					    frame:true,
					    title:''
					});
					
					var win = new Ext.Window({
							title:'运行时参数',
							width:600,
							height:360,
							closable:false,
							modal:true,
							items:[grid],
							buttons:[{text:'确定',handler:function(){
								 var rec = sm.getSelections();
								 if (!rec || rec.length <= 0){
									 
									 alert("必须选择一个");
									 return;
								 }
								 //编码数据
								 var retVal = '';
								 for (var i = 0 ; i < rec.length;i++){
									 var val = rec[i].get('name');
									 val = "${"+val+"}"
									 retVal=retVal+','+val;
								 }
									t.setValue(retVal.substr(1));
									win.close();
								}},{
									text:'取消',handler:function(){
									win.close();
									
									}
								}]
					   });
					  win.show();
					 
					});
				Ext.RuntimeParam .superclass.render.apply(this, arguments);
			}});